package com.jkc.xh.network.models;

import com.jkc.xh.utils.MD5Util;

/**
 * 注册请求参数
 * Created by zhangbreeze on 2015/12/1.
 */
public class RegisterRequest {
    public String mobile;
    public String password;
    public String code;
    public String rel_user;
    public String qq;
    public String sign;

    public RegisterRequest(String mobile, String password, String code, String rel_user, String qq) {
        this.mobile = mobile;
        this.code = code;
        this.rel_user = rel_user;
        this.qq = qq;
        this.password = MD5Util.MD5(password);
        this.sign = MD5Util.MD5(this.mobile + "|" + this.code);
    }

    /**
     *
     {
     "mobile": "手机号码 字符串 phone 必填",
     "password": "MD5_32位加密过的密码且小写，选填。如果不填的话，只能使用手机+验证码方式登录。 字符串 长度:32",
     "code": "短信验证码。在测试环境下不会真发送到手机，请使用固定1测试 字符串 必填",
     "rel_user": "推荐人 字符串 必填",
     "qq": "QQ号码 字符串 必填",
     "sign": "签名，生成规则=md5(mobile|code) 字符串 长度:32 必填"
     }
     */
}
